﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Maestro.master" AutoEventWireup="true" CodeFile="ReestablecerContrasena.aspx.cs" Inherits="ReestablecerContrasena" %>

<%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxRoundPanel" tagprefix="dxrp" %>
<%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dxp" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            text-align: left;
        }
        .style2
        {
            text-align: right;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ObjectDataSource ID="dsEmpleado" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="CrearEmpleado" 
        TypeName="SGT_ON.ONEmpleado">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="-1" Name="pID" QueryStringField="ID" 
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <table align="center">
        <tr>
            <td>
            
    <dxrp:ASPxRoundPanel ID="ASPxRoundPanel2" runat="server" BackColor="White" 
        CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua" 
        HeaderText="Reestablecer contraseña" HorizontalAlign="Center" Width="200px">
        <TopEdge>
            <BackgroundImage ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif" 
                Repeat="RepeatX" VerticalPosition="Top" />
        </TopEdge>
        <LeftEdge>
            <BackgroundImage ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif" 
                Repeat="RepeatY" VerticalPosition="Top" />
        </LeftEdge>
        <BottomRightCorner Height="7px" Url="~/App_Themes/Aqua/Web/rpBottomRight.png" 
            Width="7px" />
        <ContentPaddings Padding="14px" />
        <NoHeaderTopRightCorner Height="7px" 
            Url="~/App_Themes/Aqua/Web/rpNoHeaderTopRight.png" Width="7px" />
        <RightEdge>
            <BackgroundImage ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif" 
                Repeat="RepeatY" VerticalPosition="Top" />
        </RightEdge>
        <HeaderRightEdge>
            <BackgroundImage ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif" 
                Repeat="RepeatX" VerticalPosition="Top" />
        </HeaderRightEdge>
        <Border BorderColor="#AECAF0" BorderStyle="Solid" BorderWidth="1px" />
        <HeaderLeftEdge>
            <BackgroundImage ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif" 
                Repeat="RepeatX" VerticalPosition="Top" />
        </HeaderLeftEdge>
        <HeaderStyle BackColor="#E0EDFF">
        <BorderBottom BorderColor="#AECAF0" BorderStyle="Solid" BorderWidth="1px" />
        </HeaderStyle>
        <BottomEdge>
            <BackgroundImage ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif" 
                Repeat="RepeatX" VerticalPosition="Bottom" />
        </BottomEdge>
        <TopRightCorner Height="7px" Url="~/App_Themes/Aqua/Web/rpTopRight.png" 
            Width="7px" />
        <HeaderContent>
            <BackgroundImage ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif" 
                Repeat="RepeatX" VerticalPosition="Top" />
        </HeaderContent>
        <NoHeaderTopEdge BackColor="White">
            <BackgroundImage ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif" 
                Repeat="RepeatX" VerticalPosition="Top" />
        </NoHeaderTopEdge>
        <NoHeaderTopLeftCorner Height="7px" 
            Url="~/App_Themes/Aqua/Web/rpNoHeaderTopLeft.png" Width="7px" />
        <PanelCollection>
<dxp:PanelContent runat="server">
    <asp:FormView ID="fvEmpleado" runat="server" DataSourceID="dsEmpleado">
        <EditItemTemplate>
            ApellidoYNombre:
            <asp:TextBox ID="ApellidoYNombreTextBox" runat="server" 
                Text='<%# Bind("ApellidoYNombre") %>' />
            <br />
            SectorNombre:
            <asp:TextBox ID="SectorNombreTextBox" runat="server" 
                Text='<%# Bind("SectorNombre") %>' />
            <br />
            ID:
            <asp:TextBox ID="IDTextBox" runat="server" Text='<%# Bind("ID") %>' />
            <br />
            SectorId:
            <asp:TextBox ID="SectorIdTextBox" runat="server" 
                Text='<%# Bind("SectorId") %>' />
            <br />
            UsuarioId:
            <asp:TextBox ID="UsuarioIdTextBox" runat="server" 
                Text='<%# Bind("UsuarioId") %>' />
            <br />
            Contrasena:
            <asp:TextBox ID="ContrasenaTextBox" runat="server" 
                Text='<%# Bind("Contrasena") %>' />
            <br />
            Nombre:
            <asp:TextBox ID="NombreTextBox" runat="server" Text='<%# Bind("Nombre") %>' />
            <br />
            Apellido:
            <asp:TextBox ID="ApellidoTextBox" runat="server" 
                Text='<%# Bind("Apellido") %>' />
            <br />
            Dni:
            <asp:TextBox ID="DniTextBox" runat="server" Text='<%# Bind("Dni") %>' />
            <br />
            Cuit:
            <asp:TextBox ID="CuitTextBox" runat="server" Text='<%# Bind("Cuit") %>' />
            <br />
            TelefonoFijo:
            <asp:TextBox ID="TelefonoFijoTextBox" runat="server" 
                Text='<%# Bind("TelefonoFijo") %>' />
            <br />
            TelefonoMovil:
            <asp:TextBox ID="TelefonoMovilTextBox" runat="server" 
                Text='<%# Bind("TelefonoMovil") %>' />
            <br />
            Domicilio:
            <asp:TextBox ID="DomicilioTextBox" runat="server" 
                Text='<%# Bind("Domicilio") %>' />
            <br />
            FechaAlta:
            <asp:TextBox ID="FechaAltaTextBox" runat="server" 
                Text='<%# Bind("FechaAlta") %>' />
            <br />
            EstaActivo:
            <asp:CheckBox ID="EstaActivoCheckBox" runat="server" 
                Checked='<%# Bind("EstaActivo") %>' />
            <br />
            RolesSeguridad:
            <asp:TextBox ID="RolesSeguridadTextBox" runat="server" 
                Text='<%# Bind("RolesSeguridad") %>' />
            <br />
            Sector:
            <asp:TextBox ID="SectorTextBox" runat="server" Text='<%# Bind("Sector") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                CommandName="Update" Text="Update" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <InsertItemTemplate>
            ApellidoYNombre:
            <asp:TextBox ID="ApellidoYNombreTextBox" runat="server" 
                Text='<%# Bind("ApellidoYNombre") %>' />
            <br />
            SectorNombre:
            <asp:TextBox ID="SectorNombreTextBox" runat="server" 
                Text='<%# Bind("SectorNombre") %>' />
            <br />
            ID:
            <asp:TextBox ID="IDTextBox" runat="server" Text='<%# Bind("ID") %>' />
            <br />
            SectorId:
            <asp:TextBox ID="SectorIdTextBox" runat="server" 
                Text='<%# Bind("SectorId") %>' />
            <br />
            UsuarioId:
            <asp:TextBox ID="UsuarioIdTextBox" runat="server" 
                Text='<%# Bind("UsuarioId") %>' />
            <br />
            Contrasena:
            <asp:TextBox ID="ContrasenaTextBox" runat="server" 
                Text='<%# Bind("Contrasena") %>' />
            <br />
            Nombre:
            <asp:TextBox ID="NombreTextBox" runat="server" Text='<%# Bind("Nombre") %>' />
            <br />
            Apellido:
            <asp:TextBox ID="ApellidoTextBox" runat="server" 
                Text='<%# Bind("Apellido") %>' />
            <br />
            Dni:
            <asp:TextBox ID="DniTextBox" runat="server" Text='<%# Bind("Dni") %>' />
            <br />
            Cuit:
            <asp:TextBox ID="CuitTextBox" runat="server" Text='<%# Bind("Cuit") %>' />
            <br />
            TelefonoFijo:
            <asp:TextBox ID="TelefonoFijoTextBox" runat="server" 
                Text='<%# Bind("TelefonoFijo") %>' />
            <br />
            TelefonoMovil:
            <asp:TextBox ID="TelefonoMovilTextBox" runat="server" 
                Text='<%# Bind("TelefonoMovil") %>' />
            <br />
            Domicilio:
            <asp:TextBox ID="DomicilioTextBox" runat="server" 
                Text='<%# Bind("Domicilio") %>' />
            <br />
            FechaAlta:
            <asp:TextBox ID="FechaAltaTextBox" runat="server" 
                Text='<%# Bind("FechaAlta") %>' />
            <br />
            EstaActivo:
            <asp:CheckBox ID="EstaActivoCheckBox" runat="server" 
                Checked='<%# Bind("EstaActivo") %>' />
            <br />
            RolesSeguridad:
            <asp:TextBox ID="RolesSeguridadTextBox" runat="server" 
                Text='<%# Bind("RolesSeguridad") %>' />
            <br />
            Sector:
            <asp:TextBox ID="SectorTextBox" runat="server" Text='<%# Bind("Sector") %>' />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                CommandName="Insert" Text="Insert" />
            &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        </InsertItemTemplate>
        <ItemTemplate>
            <table align="center">
                <tr>
                    <td class="style2" nowrap="NoWrap">
                        Empleado</td>
                    <td class="style1" nowrap="NoWrap">
                        <asp:Label ID="ApellidoYNombreLabel" runat="server" style="font-weight: 700" 
                            Text='<%# Bind("ApellidoYNombre") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style2" nowrap="NoWrap">
                        Usuario Id</td>
                    <td class="style1" nowrap="NoWrap">
                        <asp:Label ID="UsuarioIdLabel" runat="server" style="font-weight: 700" 
                            Text='<%# Bind("UsuarioId") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style2" nowrap="NoWrap">
                        &nbsp;</td>
                    <td class="style1" nowrap="NoWrap">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style2" nowrap="NoWrap">
                        Nueva contraseña</td>
                    <td class="style1" nowrap="NoWrap">
                        <asp:TextBox ID="Contrasena" runat="server" MaxLength="20" TextMode="Password"></asp:TextBox>
                        <br />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            ControlToValidate="Contrasena" Display="Dynamic" 
                            ErrorMessage="Debe ingresar una contraseña" ValidationGroup="Reestablecer"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style2" nowrap="NoWrap">
                        Repetir contraseña</td>
                    <td class="style1" nowrap="NoWrap">
                        <asp:TextBox ID="ContrasenaRepetir" runat="server" MaxLength="20" 
                            TextMode="Password"></asp:TextBox>
                        <br />
                        <asp:CompareValidator ID="CompareValidator1" runat="server" 
                            ControlToCompare="Contrasena" ControlToValidate="ContrasenaRepetir" 
                            Display="Dynamic" ErrorMessage="Las contraseñas deben ser iguales" 
                            ValueToCompare="Text" ValidationGroup="Reestablecer"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td nowrap="NoWrap">
                        &nbsp;</td>
                    <td class="style1">
                        <dxe:ASPxButton ID="btnReestablecer" runat="server" 
                            CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua" 
                            onclick="btnReestablecer_Click" Text="Reestablecer" 
                            ValidationGroup="Reestablecer">
                        </dxe:ASPxButton>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:FormView>
            <br />
    <asp:Label ID="lblMensaje" runat="server" Visible="False"></asp:Label>
            </dxp:PanelContent>
</PanelCollection>
        <TopLeftCorner Height="7px" Url="~/App_Themes/Aqua/Web/rpTopLeft.png" 
            Width="7px" />
        <BottomLeftCorner Height="7px" Url="~/App_Themes/Aqua/Web/rpBottomLeft.png" 
            Width="7px" />
    </dxrp:ASPxRoundPanel>
    </td>
        </tr>
    </table>
</asp:Content>

